Skip to content

libs/crypto: crypto sets arm64's DIT around every cryptographic operation, with its guidelines and collect.py's test - #46

Merged
pinhopro merged 6 commits into
mainfrom
crypto/dit
Nov 21, 2026
Merged

pinhopro merged 6 commits into
mainfrom
crypto/dit

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

crypto's change data-independent-timing (webcpporg/crypto#11, webcpporg/proposals#22 and #23) in the superproject.

  • libs/crypto moves to 3f27988: the library sets arm64's DIT around every public cryptographic operation on every backend and restores the thread's state; a memory resource fails by throwing, never by returning null; the OpenSSL backend's resets wipe their context pointers.
  • CODING-GUIDELINES: crypto sets DIT itself (chapters 15 and 17), its constant-time lane measures what a program gets, and the memory contract by throwing, with fail_init and fail_second run with exceptions only.
  • tools/test/crypto_collect_test.py: bench/collect.py refuses a timing program not built at release, records each part's spread and UTC dates, keeps a provisional mark per part, and refuses missing or malformed data with a message.

The guard's cost and the throughput tables were measured under load and are marked provisional; the coordinator measures them again in a final quiet pass after the streams of 2026-11-20 merge.

Verified locally (CI deferred by the owner): crypto's tests and examples on native clang and gcc-15, wasip2, wasip3 and Emscripten, debug and release, from scratch; crypto's tests on arm64 Linux with DIT; the Linux lint (clean) and the full macOS lint (clean); MSVC 14.3 and 14.5 under Wine (no failure beyond the known Wine ones); all 62 tools tests.

R added 6 commits November 20, 2026 21:59
…tes, refuses missing data with a message, and marks provisional figures
…en only the other is measured, and refuses malformed data and program lines with a message
…g, never by returning null, and OpenSSL's fail_init and fail_second run with exceptions only
…tion, and a memory resource fails by throwing (gitlink 3f27988)
@pinhopro
pinhopro merged commit 8f38ac7 into main Nov 21, 2026
2 of 12 checks passed
@pinhopro
pinhopro deleted the crypto/dit branch November 21, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant